
//
//  EventListViewController.m
//  HaiGoumerMerchant
//
//  Created by apple on 17/1/18.
//  Copyright © 2017年 com.zaoguankeji.www. All rights reserved.
//

#import "EventListViewController.h"
#import "EventlistTableViewCell.h"
#import "EventDetilesInfoViewController.h"

static   NSString  *cellIndentify = @"EventlistTableViewCell";

@interface EventListViewController ()
@property(nonatomic, strong) NSMutableArray *dataArr;
@end

@implementation EventListViewController
#pragma mark -----------dataArr-------------------懒加载;
- (NSMutableArray *)dataArr{
    if (!_dataArr) {
        self.dataArr = [NSMutableArray array];
    }
    
    return _dataArr;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.dataArr = @[@"44",@"55"];
    [self configureEventListViewControllerTableView];
    self.controlVC.returnTextBlock = ^(NSString *textStr, NSInteger index) {
        
        NSLog(@"%@",textStr);
        
    };
    //设置导航控制器
}


- (void)configureEventListViewControllerTableView {
    self.tableView.tableFooterView = [UIView new];
    
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return self.dataArr.count > 0 ? self.dataArr.count : 0;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    EventlistTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndentify forIndexPath:indexPath];
    
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
    EventDetilesInfoViewController * vc = [UIStoryboard loadStoryboard:EventDetilesInfoViewControllerID];
    vc.hidesBottomBarWhenPushed =YES;
     [self.myNavVC pushViewController:vc animated:YES];
    
    
}
@end
